window.onload = function ()
{
    var canvas = document.getElementById('canvas');
    if ( !canvas.getContext )
    {
        return;
    }
    var rc = canvas.getContext('2d'); 

    rc.fillRect( 2, 2, 50, 20 );
}